<!--
 * @Author: your name
 * @Date: 2021-08-16 14:17:09
 * @LastEditTime: 2021-08-16 14:36:31
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\3-html&css\day10\07-呼吸灯案例.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            box-sizing: border-box;
        }
        
        .room {
            width: 400px;
            height: 400px;
            background-color: black;
            margin: 0 auto;
            padding: 50px;
        }
        
        .outer {
            height: 100%;
            border: 3px solid #777;
            border-radius: 50%;
            padding: 20px;
        }
        
        .inner {
            height: 100%;
            border: 10px solid #fff;
            border-radius: 50%;
        }
        /* body div:hover {
            padding: 30px;
            transition: padding 3s linear;
        } */
        
        @keyframes small {
            from {
                padding: 50px;
            }
            to {
                padding: 40px;
            }
        }
        
        @keyframes big {
            0% {
                padding: 20px;
            }
            100% {
                padding: 32px;
            }
        }
        
        .room {
            animation-name: small;
            animation-duration: 2s;
            animation-iteration-count: infinite;
            animation-timing-function: linear;
            animation-direction: alternate;
        }
        
        .outer {
            animation: big 2.5s infinite linear alternate;
        }
        
        body>div:hover {
            animation-play-state: paused;
        }
    </style>
</head>

<body>
    <div class="room">
        <div class="outer">
            <div class="inner"></div>
        </div>
    </div>
</body>

</html>